package com.wzg.jetpack_blackbox.login;

import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;
import androidx.lifecycle.ViewModelProvider;

import android.os.Bundle;

import com.blankj.utilcode.util.Utils;
import com.wzg.jetpack_blackbox.R;
import com.wzg.jetpack_blackbox.databinding.ActivityLoginBinding;
import com.wzg.jetpack_blackbox.login.LoginViewModel;

public class LoginActivity extends AppCompatActivity {

    ActivityLoginBinding loginBinding;
    LoginViewModel viewModel;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        loginBinding = DataBindingUtil.setContentView(this, R.layout.activity_login);
        viewModel = new ViewModelProvider(this,
                (ViewModelProvider.Factory) new ViewModelProvider.AndroidViewModelFactory(getApplication()))
                .get(LoginViewModel.class);
        loginBinding.setViewModel(viewModel);
//        loginBinding.setLifecycleOwner(this);


    }
}